<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
	alert("Selected Values are : \n" + total);
	}

	function selectCheckBox() {
		var total = ""
		for ( var i = 0; i < document.form.nums.length; i++) {
			if (document.form.nums[i].checked)
				total += document.form.nums[i].value + "\n"
		}
		if (total == "")
			alert("select checkboxes")
		else
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	<form name="form">
		<div style="overflow: auto; width: 100px; height: 75px; border: 1px solid #336699; padding-left: 5px">
			<input type="checkbox" name="nums" value="1"> 1<br> <input
				type="checkbox" name="nums" value="2"> 2<br> <input
				type="checkbox" name="nums" value="3"> 3<br> <input
				type="checkbox" name="nums" value="4"> 4<br> <input
				type="checkbox" name="nums" value="5"> 5<br> <input
				type="checkbox" name="nums" value="6"> 6<br>
		</div>
		<input type="button" name="goto" onClick="selectCheckBox()"
			value="Check">
		<form>
</body>
</html>